package org.dinnermate.menu;

import java.sql.SQLException;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.ManyToMany;
import net.java.ao.OneToMany;
import net.java.ao.Preload;
import net.java.ao.schema.TableName;

import org.dinnermate.db.MapClass;
import org.dinnermate.food.MenuItemIngredient;

@TableName("MenuItem")
@Implementation(MenuItemImpl.class)
@MapClass({ MenuToItem.class, MenuItemIngredient.class })
@Preload()
public interface MenuItem extends Entity
{
	public String getName();

	public void setName( String name );

	public ItemCategory getItemCategory();

	public void setItemCategory( ItemCategory itemCategory );

	public String getDescription();

	public void setDescription( String description );

	public float getPrice();

	public void setPrice( float price );
	
	public int getNumOfOrders();
	
	public void setNumOfOrders( int numOfOrders );

	@OneToMany
	public MenuItemIngredient[] getIngredients();
	
	@OneToMany
	public void setIngredients(MenuItemIngredient[] ingredients);
	
	@ManyToMany(MenuToItem.class)
	public Menu[] getMenus();
	
	public void deleteMaps() throws SQLException;
}
